﻿@model TanWeb.Models.Entities.Product
@{
    ViewBag.Title = "Cập nhật sản phẩm";
    Layout = "~/Views/Shared/_Master.cshtml";
}

<script src="@Url.Content("~/Scripts/Common/script.js")" type="text/javascript"></script>
@Scripts.Render("~/Scripts/Pages/update.js")
@Scripts.Render("~/Scripts/Common/modalPopup.js")

<div class="masterPage">
    <div class="box_center">
        <div class="div_action">
            <div>
                <input type="button" id="btnUpdate" class="button width-100" value="Cập nhật" />
            </div>
            <div>
                <input type="button" id="btnDelete" class="button width-100" value="Xóa" />
            </div>
            <div>
                <input type="button" id="btnBack" class="button width-100" value="Quay về" />
            </div>
            <div class="fileupload">
                Chọn hình ảnh
                <input type="file" id="btnUploadImage" multiple="multiple" />
            </div>
        </div>
    </div>
    <div class="box_center">
        @if (@ViewBag.Image != null)
        {
            <div class="box_image">
                <div class="block titleimage">
                    <a class="lnkImage"><img src="@ViewBag.Image" alt="" /></a>
                </div>
            </div>
        }
        <div class="detail">
            <table>
                <tr>
                    <th>Tên</th>
                    <td>@Model.Name</td>
                </tr>
                <tr>
                    <th>Giá</th>
                    <td><input type="text" id="price" value="@Model.Price" class="checkIsNum" /></td>
                </tr>
                <tr>
                    <th>Số lượng</th>
                    <td><input type="text" id="qty" value="@Model.Qty" class="checkIsNum" /></td>
                </tr>
                <tr>
                    <th>Mô tả</th>
                    <td><textarea type="text" id="description" class="textarea checkMaxLength" maxlength="500">@Model.Description</textarea></td>
                </tr>
                <tr>
                    <th>Dịch vụ miễn phí</th>
                    <td><textarea id="freeService" class="textarea checkMaxLength" maxlength="500">@Model.FreeService</textarea></td>
                </tr>
                <tr>
                    <th>Dịch vụ tính phí</th>
                    <td><textarea  id="feeService" class="textarea checkMaxLength" maxlength="500">@Model.FeeService</textarea></td>
                </tr>
            </table>
        </div>
    </div>
    <input type="hidden" id="goBack" value="@ViewBag.GoBack" />
    <input type="hidden" id="groupId" value="@Model.GroupId" />
    <input type="hidden" id="subGroupId" value="@Model.SubGroupId" />
    <input type="hidden" id="productId" value="@Model.id" />
</div>
